<template>
  <div>
    <Header fixed :title="headerText">
      <span  slot="left">
        <Button icon="back" @click="$router.back()">返回</Button>
      </span>
    </Header>
    <keep-alive :exclude="['repairRecordDetails']">
      <router-view class="repair-layout-wrap"/>
    </keep-alive>
    <tabWrap v-if="$route.name!='details'&&$route.name!='done'" />
  </div>
</template>

<script>
  import {Header,Button} from 'mint-ui';
  import tabWrap from './components/tab-wrap';

  export default {
    name: "layout",
    components: {
      tabWrap,
      Header,
      Button
    },
    data() {
      return {
        headerText: ''
      }
    },
    watch: {
      $route: {
        immediate: true,
        handler(val) {
          this.headerText = val.meta.title;
        }
      }
    }
  }
</script>

<style>
  .img-item {
    display: block;
    width: 100px;
    height: 100px;
    border-radius: 2px;
  }
</style>
<style scoped lang="scss">
  .repair-layout-wrap {
    padding-top: 40px;
  }

</style>
